home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
AMIGA
/
AMICUS
/
AMIBEST2.ADF
/
Best of AMICUS 2
/
C
/
Emacs_Keys.C
< prev
next >
Wrap
C/C++ Source or Header
|
1987-07-22
|
2KB
|
62 lines
/* File: EMACS_KEYS.C ===================================
Greg Douglas 2 Jan 87
Description: This program will create a file that
MicroEMACS can read to redefine keyboard functions.
Use the EXTRAS menu LOAD KEY function to load the key
definitions file.
Compiled using Lattice 3.10 and linked using Blink
========================================================*/
#include <stdio.h>
#define NUMKEYS 24 /* Number of key definitions */
void main()
{
/* string array can be up to 80 characters - I used 15 */
static char func_key[][15] =
/*--- key definitions-------*/
{ "~\n", /* Auto start string */
"\01\13\31\15\31~\n", /* F1 = ^A^K^Y^M^Y Dup line */
"\30\04~\n", /* F2 = ^X^D Delete line */
"\33-~\n", /* F3 = ESC- Set Mark */
"\27~\n", /* F4 = ^W Kill region */
"\33W~\n", /* F5 = ESC W Copy region */
"\31~\n", /* F6 = ^Y Yank buffer */
"\33V~\n", /* F7 = ESC V Screen up */
"\26~\n", /* F8 = ^V Screen down */
"\30\23~\n", /* F9 = ^X^S Save file */
"\30\06~\n", /* F10= ^X^F Save file/Ex*/
"\12~\n", /* HELP = ^J Indent */
"\30n~\n", /* 0 = ^Xn Next window */
"\13~\n", /* 1 = ^K Del to EOL */
"2~\n", /* 2 = 0 */
"\33>~\n", /* 3 = ESC > End of buff */
"4~\n", /* 4 = 0 */
"5~\n", /* 5 = 0 */
"6~\n", /* 6 = 0 */
"7~\n", /* 7 = 0 */
"8~\n", /* 8 = 0 */
"\33<~\n", /* 9 = ESC < Top of buff */
"\30p~\n", /* . = ^Xp Prev window */
"\30\7~\n", /* Enter = ^X^G Goto Line */
"/* */\2\2\2\2~\n" /* - Comm't mark */
};
int i;
FILE *out_file, *fopen();
out_file = fopen("emacs_config","w");
/* Write func_key array to file */
for (i = 0; i < NUMKEYS + 1; ++i)
fputs(func_key[i],out_file);
fclose(out_file);
}
/* -------------- End of Program ----------------*/